//
//  QSButton.m
//  UIA段项目 墨家天气
//
//  Created by dllo on 15/8/27.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "QSButton.h"

@implementation QSButton

- (void)dealloc
{
    
    [_weak release];
    [_highPoint release];
    [_high release];
    [_lowPoint release];
    [_low release];
    [_sky release];
    [_wind release];
    
    
    
    [super dealloc];
    
}
-(instancetype)initWithFrame:(CGRect)frame
{
   
    
    self = [super initWithFrame:frame];
    if (self) {
        
        
        
        self.weak = [[UILabel alloc]init];
        self.weak.textAlignment = 1;
        self.weak.font = [UIFont systemFontOfSize:17 * OffWidth];
        self.weak.textColor = [UIColor whiteColor];
       [self addSubview:_weak];
        [_weak release];
        
        self.high = [[UILabel alloc]init];
        self.high.font = [UIFont systemFontOfSize:17 * OffWidth];
        self.high.textColor = [UIColor whiteColor];
        [self addSubview:_high];
        [_high release];
        
        self.low = [[UILabel alloc]init];
        self.low.font = [UIFont systemFontOfSize:17 * OffWidth];

        self.low.textColor = [UIColor whiteColor];
        [self addSubview:_low];
        [_low release];
       
        self.sky = [[UILabel alloc]init];
        self.sky.font = [UIFont boldSystemFontOfSize:13 * OffWidth];
        self.sky.textAlignment = 1;
        self.sky.textColor = [UIColor whiteColor];
        [self addSubview:_sky];
        [_sky release];
       
        self.highPoint = [[UILabel alloc]init];
        self.highPoint.textColor = [UIColor whiteColor];
      
        [self addSubview:_highPoint];
        [_highPoint release];
        
        
        self.lowPoint = [[UILabel alloc]init];
        self.lowPoint.textColor = [UIColor whiteColor];

        [self addSubview:_lowPoint];
        [_lowPoint release];
        
        
        
        self.wind = [[UILabel alloc]init];
        self.wind.textAlignment = 1;
        self.wind.textColor = [UIColor whiteColor];
        self.wind.font = [UIFont boldSystemFontOfSize:15 * OffWidth];
        [self addSubview:_wind];
        [_wind release];
        
    }
    
    
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.weak.frame = CGRectMake(0, 0, self.frame.size.width, 30 * OffHeight);
    self.sky .frame = CGRectMake(0, 20 * OffHeight, self.frame.size.width, 30 * OffHeight);
    self.wind.frame = CGRectMake(0, self.frame.size.height - 50 * OffWidth , self.frame.size.width, 20 * OffHeight);
}

@end
